package cn.bone.ou.user.controller;

import cn.bone.base.bean.CommonResult;
import cn.bone.ou.user.param.ApplyParam;
import cn.bone.ou.user.service.IUserApplyService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RequestMapping("/ou/userApply")
@RestController
public class UserApplyController {

    @Resource
    private IUserApplyService applyService;

    @RequestMapping("/accept")
    public CommonResult accept(@Valid ApplyParam.AcceptParam param){
        return applyService.accept(param);
    }

    @RequestMapping("/refuse")
    public CommonResult refuse(@Valid ApplyParam.RefuseParam param){
        return applyService.refuse(param);
    }

    @RequestMapping("/list")
    public CommonResult list(@Valid ApplyParam.ListParam param){
        return applyService.list(param);
    }
}
